
from math import remainder
from app.common.model import BaseModel, RecodeMixinModel
from sqlalchemy import Column, DateTime, String, INT, Float


class GoodsModel(BaseModel):
    __tablename__ = 'goods'
    id = Column(INT, autoincrement=True, primary_key=True, comment='自增ID')
    cate_id = Column(INT, nullable=False, comment='商品分类ID')
    name = Column(String(32), nullable=False, comment='商品规则名称')
    sort = Column(INT, nullable=False, comment='商品规则排序')
    status = Column(INT, nullable=False, comment='商品规则状态')
    remark = Column(String(255), nullable=False, comment='商品规则描述')
    price = Column(Float, nullable=False, comment='商品价格')


class GoodsCateModel(BaseModel):
    __tablename__ = 'goods_cate'
    id = Column(INT, autoincrement=True, primary_key=True, comment='自增ID')
    name = Column(String(32), nullable=False, comment='商品分类名称')
    sort = Column(INT, nullable=False, comment='商品分类排序')
    status = Column(INT, nullable=False, comment='商品分类状态')
    remark = Column(String(255), nullable=False, comment='商品分类描述')
